// +build windows

package encoding

import (
	"os"
	"syscall"
)

// InitUTF8 initializes UTF-8 encoding for Windows console
func InitUTF8() {
	// Set console output to UTF-8
	kernel32 := syscall.NewLazyDLL("kernel32.dll")
	setConsoleOutputCP := kernel32.NewProc("SetConsoleOutputCP")
	setConsoleOutputCP.Call(uintptr(65001)) // CP_UTF8 = 65001

	// Set environment variable for Go runtime
	os.Setenv("LANG", "en_US.UTF-8")
	os.Setenv("LC_ALL", "en_US.UTF-8")
}

